<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .text{
        margin: 0 auto;
    }
</style>
    
<script>
    document.onload = function() {
        var allA = document.getElementsByTagName("a");
        for(var i = 0 ; i < allA.length ; i ++){
            allA[i].onclick = function () {
                alert("hello")
            }
        }
    }
</script>

<body>
    <table border="2" bordercolor="black" width="300" cellspacing="0" cellpadding="5" class="text">
        <tr>
            <th>1.1</th>
            <th>1.2</th>
            <th>1.3</th>
            <th>操作</th>
        </tr>
        <tr>
            <td>2.1</td>
            <td>2.2</td>
            <td>2.3</td>
            <td><a href="javasript:;?id=001">delete</a></td>
        </tr>
        <tr>
            <td>3.1</td>
            <td>3.2</td>
            <td>3.3</td>
            <td><a href="javasript:;?id=002">delete</a></td>
        </tr>
        <tr>
            <td>3.1</td>
            <td>3.2</td>
            <td>3.3</td>
            <td><a href="javasript:;?id=003">delete</a></td>
        </tr>
    </table>
</body>

</html>